package com.naiterui.ehp.bp.domain;

import static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 患者诊疗记录图片
 * @author Amber
 * @since 1.0.0
 */
@Entity
@Table(name = "patient_record_img")
public class PatientRecordImg implements Serializable {
    /**
     * 字段或域定义：<code>serialVersionUID</code>
     */
    private static final long serialVersionUID = 5320633900855053554L;
    // 主键
    private Long id;
    // uuid
    private String uuid;
    // 诊疗记录uuid
    private String recordUuid;
    // 诊疗记录id
    private Long recordId;
    // 图片地址
    private String imgUrl;
    // 创建时间
    private Date createdAt;
    // 创建人
    private String createdBy;
    // 修改时间
    private Date changedAt;
    // 修改人
    private String changedBy;
    // 版本号
    private Integer version;


    public PatientRecordImg() {
    }

    public PatientRecordImg(Long recordId, String imgUrl) {
        super();
        this.recordId = recordId;
        this.imgUrl = imgUrl;
        this.createdAt = new Date();
    }

    /**
     * @return Long 取得域 id 的方法。
     */
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }

    /**
     * @param id 对域 id 的设置方法.
     */
    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "uuid")
    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    /**
     * @return Long 取得域 recordId 的方法。
     */
    @Column(name = "record_id", nullable = false)
    public Long getRecordId() {
        return this.recordId;
    }

    /**
     * @param recordId 对域 recordId 的设置方法.
     */
    public void setRecordId(Long recordId) {
        this.recordId = recordId;
    }

    @Column(name = "record_uuid", nullable = false)
    public String getRecordUuid() {
        return recordUuid;
    }

    public void setRecordUuid(String recordUuid) {
        this.recordUuid = recordUuid;
    }


    /**
     * @return String 取得域 imgUrl 的方法。
     */
    @Column(name = "img_url", nullable = false)
    public String getImgUrl() {
        return this.imgUrl;
    }

    /**
     * @param imgUrl 对域 imgUrl 的设置方法.
     */
    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    /**
     * @return Date 取得域 createdAt 的方法。
     */
    @Column(name = "created_at")
    public Date getCreatedAt() {
        return this.createdAt;
    }

    /**
     * @param createdAt 对域 createdAt 的设置方法.
     */
    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    @Column(name = "created_by")
    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    @Column(name = "changed_at")
    public Date getChangedAt() {
        return changedAt;
    }

    public void setChangedAt(Date changedAt) {
        this.changedAt = changedAt;
    }

    @Column(name = "changed_by")
    public String getChangedBy() {
        return changedBy;
    }

    public void setChangedBy(String changedBy) {
        this.changedBy = changedBy;
    }

    @Column(name = "version")
    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

}
